package com.xxxx;

import com.xxxx.service.BookService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created By ShaoXikai on 2022/7/18
 */
public class TestApp {
    public static void main(String[] args) {
        // 获取IoC容器
        ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
        // 获取bean对象
        // BookDao bookDao = ac.getBean("bookDao", BookDao.class);
        // bookDao.save();
        BookService bookService = ac.getBean("bookService", BookService.class);
        bookService.save();
    }
}
